{% extends "base/api-iterate.html" %}

{% block title %}items listing{% endblock %}

{% block heading %}items listing{% endblock %}

{% block listing_per_hash %}
<div class="listitem {{hash.itemStatus}}">

<h4>{{hash.itemId}} | {{hash.itemName}}</h4>

{% include 'widget/action2-item.html' %}

{% if hash.itemHasFile %}
{% ifequal hash.itemType 'image/jpeg' %}
<a href="/api/data/{{hash.itemId}}"><img src='/api/icon/{{hash.itemId}}'/></a>
{% else %}
{% ifequal hash.itemType 'image/gif' %}
<a href="/api/data/{{hash.itemId}}"><img src='/api/icon/{{hash.itemId}}'/></a>
{% else %}
{% ifequal hash.itemType 'image/png' %}
<a href="/api/data/{{hash.itemId}}"><img src='/api/icon/{{hash.itemId}}'/></a>
{% else %}
{% ifequal hash.itemType 'application/pdf' %}
<a href="/api/data/{{hash.itemId}}"><img src='/api/icon/{{hash.itemId}}'/></a>
{% else %}
[no thumbnail]
{% endifequal %}
{% endifequal %}
{% endifequal %}
{% endifequal %}
{% endif %}

{% if hash.itemDescription %}
<p class="listdesc">
{{hash.itemDescription|safe}}
</p>
{% endif %}

<ul class="listmeta">
<li>id: {{hash.itemId}}</li>
<li>status: {{hash.itemStatus}}</li>
<li>tags: {{hash.itemTags}}</li>
<li>size: {{hash.itemSize}}</li>
<li>type: {{hash.itemType}}</li>
</ul>

</div>
{% endblock %}

{% block context_sidebar %}
{% include "sidebar/items.html" %}
{% include "sidebar/item-search.html" %}
{% endblock %}
{% block nav_items %}id=current{% endblock %}
